﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataStructs
{
    class Program
    {
        static void Main(string[] args)
        {

             LinkedList ls = new LinkedList();

             Console.Write("Populating Single List: \n");

               ls.addNode("First");

               ls.addNode("Second");

               ls.addNode("Third");

               ls.addNode("Fourth");

               Console.Write("Search for object Second:" + ls.Contains("Second") + "\n" );

               Console.Write("Complete List: \n");
            
               ls.diplayList();

             //  Console.WriteLine("After Replace");

             //  ls.Replace(2, "Five");

            //   ls.Remove("Third");


             ///  Console.WriteLine("After Remove AT");

              // ls.RemoveAtPosition(2);

            

              // Console.WriteLine("Removed Object is " + ls.RemoveAtPosition(2));

              // ls.diplayList(); 
            Console.Write ("\nDoouble Linked List: \n");

            DoubleLinkList dbList = new DoubleLinkList();

            dbList.addNode("First");
            dbList.addNode("Second");
            dbList.addNode("Third");

            dbList.PrintDList();

            Console.ReadKey();   


        }
    }
}
